#ifndef MHSJ_ACTIVEVAR_H
#define MHSJ_ACTIVEVAR_H

#include "Pass.h"
#include "Module.h"

class ActiveVar : public Pass
{
public:
    ActiveVar(Module *module) : Pass(module) {}
    void execute() final;
    void GetUD(BasicBlock* bb);
    void Debug(Function* func_);
    void Getlive(Function* func_);
    const std::string get_name() const override {return name;}
private:
    std::map<BasicBlock *, std::set<Value *>> not_phi_use, def, phi_use;
    std::map<BasicBlock *, std::set<Value *>> live_in, live_out;
    Function *func_;
    const std::string name = "ActiveVar";
};
#endif  // MHSJ_ACTIVEVAR_H
